/**
 * 系统菜单（权限）API
 * @author rxliuli
 */
const sysMenuApi = new class SysMenuApi extends BaseApi {
    constructor() {
        super({url: '/api/sysMenu'})
    }

    /**
     * 加载当前用户的系统菜单列表
     * @return {Promise.<>}
     */
    loadSysMenuList = rx.cacheUtil.onceOfSameParam(async () => (await rxajax.get(this.using('/load-sys-menu-list'))).data.data, {
        identity: 'sysMenuApi.loadSysMenuList',
    })

    async getParentPath(path) {
        return (await rxajax.get(this.using('/get-parent-path'),{path:path})).data.data
    }
}